/* ViewInOutData.java
 *
 * Project/Product: GWBS2009
 *
 * Modify Information:
 * =============================================================================
 *   Author	Date       Description
 *   ----------	---------- ---------------------------------------------------
 *   Arrow	2009-4-14	First release
 *
 * Licensed Materials - Property of APEP
 * =============================================================================
 *    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2009
 *    All Rights Reserved.
 *
 *    This software is the confidential and proprietary information of
 *    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
 *    You shall not disclose such Confidential Information and shall use it only
 *    in accordance with the terms of the license agreement you entered into 
 *    with Shanghai Auto Mart E-Procurement Co., Ltd.
 *
 * Noties:
 * =============================================================================
 * 
 */

package system.base;

import java.util.ArrayList;
import java.util.List;

import system.LoginContext;
import framework.core.DBConnection;
import framework.core.DateUtil;

public class ViewInOutData {
    private List list = null;
    private String calTime = new DateUtil().getFullString();
    
    private static ViewInOutData INSTANCE = new ViewInOutData();
    
    private ViewInOutData(){
    }
    
    public static ViewInOutData getInstance(DBConnection con, LoginContext loginInfo, String currentDate){
       
        try{
               List list = InOutCal.calInOutBySelectTable(con, loginInfo, currentDate);
               INSTANCE.setList(list);
               INSTANCE.setCalTime(new DateUtil().getFullString());
        }
        catch(Exception e){
            e.printStackTrace();
        }
        
        return INSTANCE;
    }

    /**
     * @return the list
     */
    public List getList() {
        return this.list;
    }

    /**
     * @param aList the list to set
     */
    public void setList(List aList) {
        this.list = aList;
    }

    /**
     * @return the calTime
     */
    public String getCalTime() {
        return this.calTime;
    }

    /**
     * @param aCalTime the calTime to set
     */
    public void setCalTime(String aCalTime) {
        this.calTime = aCalTime;
    }
    
    
}
